﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Hammock.Web;

namespace TMWS
{
	using Models;

	/// <summary>
	/// Server service
	/// </summary>
	public class ServerService : ServiceBase
	{
		#region Constructors

		public ServerService(string username, string password)
			: base(username, password)
		{
		}

		public ServerService(string username, string password, bool enableLogging, string logDirectory)
			: base(username, password, enableLogging, logDirectory)
		{
		}

		#endregion

		#region Public Methods

		/// <summary>
		/// Gets information for the specified server
		/// </summary>
		/// <param name="serverLogin">Server login</param>
		/// <returns>Server information</returns>
		public Server GetServerInformation(string serverLogin)
		{
			string resource = String.Format("tmf/servers/{0}/", serverLogin);

			return Execute<Server>(resource, WebMethod.Get);
		}

		#endregion
	}
}